import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'
import { WebLinkService } from './web-link.service'
import { WebLinkController } from './web-link.controller'
import { IPMiddleware } from 'src/middleware/ip'
import { VisitService } from '../visit/visit.service'

@Module({
    controllers: [WebLinkController],
    providers: [WebLinkService, VisitService]
})
export class WebLinkModule implements NestModule {
    configure(consumer: MiddlewareConsumer) {
        consumer.apply(IPMiddleware).forRoutes('web-link')
    }
}
